<?php
	header('content-type:text/html;charset=utf-8'); 
	//重要!兩種情況中都要判斷DID是否存在,DID不存在,還要判斷工單號和機台號是否為空
	//2018-3-16 11:08:32注釋:想起來好像前端就應該做判斷過濾掉這種情況
	//$GX=$_GET["nos"];
	//data:"&light_pass_number="+$("#light_pass_number").val()+"&voltage="+$("#voltage").val()+"&color_area="+$("#color_area").val()+"&bin_code="+$("#bin_code").val()+"&xianzhi="+$("#xianzhi").val()+"&dianliu="+$("#dianliu").val()+"&LSM="+$("#LSM").val()+"&order_id="+$("#order_id").val()+"&CPXH="+$("#CPXH").val()+"&number="+$("#number").val()+"&time="+$("#time").val(),
	
	$order_id = $_POST["order_id"];//工单号
	
	$pdo =new pdo("mysql:host=127.0.0.1;port=3306;dbname=tddb;","root","tdled2018");
	$pdo->query("set character set 'utf8'");//读库 
	$pdo->query("set names 'utf8'");//写库 
	
	
	$sql="SELECT 
				mom_orderdetail.Qty
			FROM 
				mom_orderdetail 
			inner join 
				mom_order
			on 
				mom_orderdetail.MoId=mom_order.MoId
			where 
				MoCode='AK1852580'

			";
	$res=$pdo->prepare($sql);//准备查询语句 
	$res->execute(); //执行一条查询语句
	
	echo $res;
	
	
?>